package com.heima.utils.threadlocal;


import com.heima.model.wemedia.pojos.WmUser;

public class WmThreadLocalUtils {
    private final  static ThreadLocal<WmUser> userThreadLocal = new ThreadLocal<>();
    //设置当前线程中的用户
    public static void setUser(WmUser user){
        userThreadLocal.set(user);
    }
    //获取线程中的用户
    public static WmUser getUser( ){
        return userThreadLocal.get();
    }

}
